# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.MigrationCenter.V1.Model.VmwareEnginePreferences do
  @moduledoc """
  The user preferences relating to Google Cloud VMware Engine target platform.

  ## Attributes

  *   `commitmentPlan` (*type:* `String.t`, *default:* `nil`) - Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.
  *   `cpuOvercommitRatio` (*type:* `float()`, *default:* `nil`) - CPU overcommit ratio. Acceptable values are between 1.0 and 8.0, with 0.1 increment.
  *   `memoryOvercommitRatio` (*type:* `float()`, *default:* `nil`) - Memory overcommit ratio. Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0.
  *   `storageDeduplicationCompressionRatio` (*type:* `float()`, *default:* `nil`) - The Deduplication and Compression ratio is based on the logical (Used Before) space required to store data before applying deduplication and compression, in relation to the physical (Used After) space required after applying deduplication and compression. Specifically, the ratio is the Used Before space divided by the Used After space. For example, if the Used Before space is 3 GB, but the physical Used After space is 1 GB, the deduplication and compression ratio is 3x. Acceptable values are between 1.0 and 4.0.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :commitmentPlan => String.t() | nil,
          :cpuOvercommitRatio => float() | nil,
          :memoryOvercommitRatio => float() | nil,
          :storageDeduplicationCompressionRatio => float() | nil
        }

  field(:commitmentPlan)
  field(:cpuOvercommitRatio)
  field(:memoryOvercommitRatio)
  field(:storageDeduplicationCompressionRatio)
end

defimpl Poison.Decoder, for: GoogleApi.MigrationCenter.V1.Model.VmwareEnginePreferences do
  def decode(value, options) do
    GoogleApi.MigrationCenter.V1.Model.VmwareEnginePreferences.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.MigrationCenter.V1.Model.VmwareEnginePreferences do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
